<%--
    Document   : index
    Created on : Mar 10, 2014, 10:54:45 PM
    Author     : Anton Strack
--%>
<c:forEach items="${beans}" var="bean" >
    <csd:userPostHistory postItemBean="${bean}"></csd:userPostHistory>
    <article class="panel ${postHistoryStateClass}">
        <div class="panel-heading"><h3 class="panel-title"><a href="${req.contextPath}?action=view&resource=plot&id=${bean.id}">${bean.name}</a></h3>${postHistoryStateName}</div>
        <div class="panel-body">
            <p>
                ${bean.description}
            </p>
        </div>
        <div class="panel-footer">
            <p>Created By: ${bean.getDerivedValue("CreatedByName")} on <csd:displayTimestamp timestamp="${bean.createdDate}"></csd:displayTimestamp>
            <c:if test="${bean.createdDate != bean.updatedDate}">
                and updated
                <c:if test="${bean.updatedById != bean.createdById}">
                    by: ${bean.getDerivedValue("UpdatedByName")}
                </c:if>
                on <csd:displayTimestamp timestamp="${bean.updatedDate}"></csd:displayTimestamp>
            </c:if>
            </p>
            <p><a href="${req.contextPath}?action=view&resource=plot&id=${bean.id}">Read full post</a></p>
        </div>
    </article>
</c:forEach>

